/*global require*/
"use strict";
var sass = require("gulp-sass");

var gulp = require("gulp");

var minifyCSS = require('gulp-minify-css')

gulp.task('default', ['scss']);

gulp.task("scss", function () {
    gulp.src("src/scss/main.scss")
    .pipe(sass())
    .pipe(minifyCSS())
    .pipe(gulp.dest("./bulid"));
});

//在命令行执行：gulp sass:watch，就可实现监听文件变化来自动编译
gulp.task('scss:watch', function () {
  gulp.watch('./src/scss/main.scss', ['scss']);
});